package com.tian.mybatis.config;

/**
 * @author tianwc  公众号：java后端技术全栈、面试专栏
 * @version 1.0.0
 * @date 2023年09月21日 11:13
 * 在线刷题 1200+题和1000+篇干货文章：<a href="https://woaijava.cc/">博客地址</a>
 * <p>
 * XxxMapper.xml配置文件  SQL映射类
 *
 * <insert id="insert" resultType="java.lang.Integer" parameterType="com.tian.test.User">
 * insert into user values (null,#{userName})
 * </insert>
 */
public class MapperStatement {
    /**
     * id标识 每条SQL的唯一标识
     */
    private String id;
    /**
     * SQL语句返回值类型
     */
    private String resultType;
    /**
     * 参数类型
     */
    private String parameterType;

    /**
     * SQL语句
     */
    private String sql;
    /**
     * SQL类型  <select> <insert> <update>  <delete>
     */
    private String sqlType;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getResultType() {
        return resultType;
    }

    public void setResultType(String resultType) {
        this.resultType = resultType;
    }

    public String getParameterType() {
        return parameterType;
    }

    public void setParameterType(String parameterType) {
        this.parameterType = parameterType;
    }

    public String getSql() {
        return sql;
    }

    public void setSql(String sql) {
        this.sql = sql;
    }

    public String getSqlType() {
        return sqlType;
    }

    public void setSqlType(String sqlType) {
        this.sqlType = sqlType;
    }

    @Override
    public String toString() {
        return "MapperStatement{" +
                "id='" + id + '\'' +
                ", resultType='" + resultType + '\'' +
                ", parameterType='" + parameterType + '\'' +
                ", sql='" + sql + '\'' +
                ", sqlType='" + sqlType + '\'' +
                '}';
    }
}
